
<%
	if (session.getAttribute("userId") != null) {
		response.sendRedirect("home.jsp");
	} else {
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Login | Powered by MetaCUBE Granth</title>
<link rel="stylesheet" type="text/css" href="style1.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/validate.js"></script>
<script type="text/javascript">
	ddaccordion.init({
		headerclass : "submenuheader",
		contentclass : "submenu",
		revealtype : "click", 
		mouseoverdelay : 200,
		collapseprev : true, 
		defaultexpanded : [], 
		onemustopen : false, 
		animatedefault : false, 
		persiststate : true, 
		toggleclass : [ "", "" ], 
		togglehtml : [ "suffix",
				"<img src='images/plus.gif' class='statusicon' />",
				"<img src='images/minus.gif' class='statusicon' />" ], 
		animatespeed : "fast", 
		oninit : function(headers, expandedindices) { 
			
		},
		onopenclose : function(header, index, state, isuseractivated) {
		}
	})
</script>

<script type="text/javascript" src="js/jconfirmaction.jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$('.ask').jConfirmAction();
	});
</script>

<script language="javascript" type="text/javascript" src="js/niceforms.js"></script>
<link rel="stylesheet" type="text/css" media="all"
	href="niceforms-default.css" />

</head>
<body>
	<div id="main_container">

		<div class="header_login">
			<div class="logo">
				<a href="index.jsp"><img src="images/logo.png" alt="" title=""
					border="0" /> </a>
			</div>

		</div>


		<div class="login_form">

			<h3>Login Here</h3>

			<a href="signup.jsp" class="forgot_pass" >New User?&nbsp; Sign Up</a>

			<form action="login.do" method="post" class="niceform" onsubmit="return loginValidate()">

				<fieldset>
					<dl>
						<dt>
							<label for="email">Username:</label>
						</dt>
						<dd>
							<input type="text" name="username" id="username" size="54" placeholder="Ex : abcd@domainname.com"/>
						</dd>
					</dl>
					<dl>
						<dt>
							<label for="password">Password:</label>
						</dt>
						<dd>
							<input type="password" name="password" id="password" size="54" />
						</dd>
					</dl>
					<%if(request.getAttribute("msg")!=null){%>
						<table><tr><td id="tderror" class="error" height="15px"><%=request.getAttribute("msg")%></td></tr></table>
					<%} else {%>
					<table><tr><td id="tderror" class="error" height="15px"></td></tr></table>
					<%} %>
					
					
					<dl class="submit">
						<input type="submit" name="submit" id="submit" value="Login" />
					</dl>

				</fieldset>

			</form>
		</div>



		<div class="footer_login">

			<div class="left_footer_login">
				METACUBEGRANTH | Powered by <a href="http://www.metacube.com/">METACUBE</a>
			</div>
			<div class="right_footer_login">
				<a href="index.jsp"><img src="images/footer_logo.png" alt="" title=""
					border="0" /> </a>
			</div>

		</div>

	</div>
</body>
</html>
<%}%>